<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="html_header(links, style)">
	<meta charset="utf-8"></meta>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name=”renderer” content=”webkit|ie-comp|ie-stand” />  
	
	<title>合同管理系统</title>
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<link rel="stylesheet" href="../static/lib/bootstrap/3.3.7/css/bootstrap.min.css" th:href="@{/lib/bootstrap/3.3.7/css/bootstrap.min.css}" />
	<link rel="stylesheet" href="../static/lib/font-awesome/4.7.0/css/font-awesome.min.css" th:href="@{/lib/font-awesome/4.7.0/css/font-awesome.min.css}" />
	<link rel="stylesheet" href="../static/lib/ionicons/2.0.1/css/ionicons.min.css" th:href="@{/lib/ionicons/2.0.1/css/ionicons.min.css}" />
	<link rel="stylesheet" href="../static/lib/AdminLTE/2.3.11/css/AdminLTE.min.css" th:href="@{/lib/AdminLTE/2.3.11/css/AdminLTE.min.css}" />
	<link rel="stylesheet" href="../static/lib/AdminLTE/2.3.11/css/skin-blue.css" th:href="@{/lib/AdminLTE/2.3.11/css/skin-blue.css}" />
	<th:block th:replace="${links}" />
	<link rel="stylesheet" href="../static/css/site.css" th:href="@{/css/site.css}" />
	<th:block th:replace="${style}" />
	<!--[if lt IE 9]>
	<script>
		alert("请使用IE9以上的浏览器，如果您使用360或QQ等浏览器，请将浏览器切换到极速模式！");
		location.href="[[@{/logout}]]";
	</script>
	<script src="../static/lib/html5shiv/3.7.3/html5shiv.min.js" th:src="@{/lib/html5shiv/3.7.3/html5shiv.min.js}"></script>
	<script src="../static/lib/respond/1.4.2/respond.min.js" th:src="@{/lib/respond/1.4.2/respond.min.js}"></script>
	<![endif]-->
	<script src="../static/lib/jquery/jquery-3.2.1.min.js" th:src="@{/lib/jquery/jquery-3.2.1.min.js}"></script>
	<script src="../static/lib/bootstrap/3.3.6/js/bootstrap.min.js" th:src="@{/lib/bootstrap/3.3.7/js/bootstrap.min.js}"></script>
	<script src="../static/lib/slimScroll/1.3.8/jquery.slimscroll.min.js" th:src="@{/lib/slimScroll/1.3.8/jquery.slimscroll.min.js}"></script>
	<script src="../static/lib/AdminLTE/2.3.11/js/app.js" th:src="@{/lib/AdminLTE/2.3.11/js/app.js}"></script>
	<script src="../static/js/site.js" th:src="@{/js/site.js}"></script>
	
	<th:block th:if="${session.user.right == 5}">
	<script type="text/javascript">
	$(function(){
		$.post("[[@{/apply/count}]]", function(ret){
			if(ret.success) {
				$("#menu_apply_count").text(ret.message.apply);
				$("#menu_modify_count").text(ret.message.modify);
				$("#menu_print_count").text(ret.message.print);
				$("#menu_put_count").text(ret.message.put);
			}
		});
	});
	</script>
	</th:block>
	<th:block th:if="${session.user.right == 1 || session.user.right == 2 || session.user.right == 3 || session.user.right == 4}">
	<script type="text/javascript">
	$(function(){
		$.post("[[@{/audit/count}]]", function(ret){
			if(ret.success) {
				$("#menu_htgz_count").text(ret.message.htgz);
				$("#menu_htzf_count").text(ret.message.htzf);
				$("#menu_htcs_count").text(ret.message.htcs);
				$("#menu_htfs_count").text(ret.message.htfs);
			}
		});
	});
	</script>
	</th:block>
</head>

<body class="hold-transition skin-blue fixed">
<div class="wrapper">

<header class="main-header" th:fragment="header">
	<a href="#" class="logo">
		<span class="logo-mini" style="background-color: #303643">
			<img th:src="@{/img/logo_small.png}" style="width: 40px;height: 40px">
		</span>
		<span class="logo-lg" style="background-color: #303643">
			<img th:src="@{/img/logo_white.png}" style="width: 150px;height: 35px">
		</span>
	</a>
	<nav class="navbar navbar-static-top">
		<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
			<span class="sr-only">Toggle navigation</span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
		</a>
		<div class="navbar-custom-menu">
			<ul class="nav navbar-nav">
				<!-- 头部功能区 S -->

				<li class="dropdown user user-menu">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						<img th:src="${session.user.sex} ? @{/lib/AdminLTE/2.3.11/img/avatar5.png} : @{/lib/AdminLTE/2.3.11/img/avatar2.png}" class="user-image" alt="User Image" />
						<span class="hidden-xs" th:text="${session.user.username}">系统管理员</span>
					</a>
					<ul class="dropdown-menu">
						<li class="user-header">
							<img th:src="${session.user.sex} ? @{/lib/AdminLTE/2.3.11/img/avatar5.png} : @{/lib/AdminLTE/2.3.11/img/avatar2.png}" class="img-circle" alt="User Image" />
							<p>
								<span th:text="${session.user.name}">admin</span>
								<small th:text="${session.user?.dept?.deptName} ?: '系统管理员'"></small>
							</p>
						</li>

						<li class="user-footer">
							<div class="pull-left"><a th:href="@{/user/password}" class="btn btn-default btn-flat">修改密码</a></div>
							<div class="pull-right">
								<form th:action="@{/logout}" method="post">
									<button class="btn btn-default btn-flat" type="submit">退出登录</button>
								</form>
							</div>
						</li>
					</ul>
				</li>
				<!-- 头部功能区 E -->
			</ul>
		</div>
	</nav>
</header>

<aside class="main-sidebar">
	<section class="sidebar" th:fragment="menu">
		<ul class="sidebar-menu">
			<li><a th:href="@{/index}"><i class="fa fa-home"></i>首页</a></li>
			<th:block th:if="${session.user.right == 5}">
			<li class="treeview active">
				<a href="#">
					<i class="fa fa-dashboard"></i>
					<span>合同录入</span>
					<span class="pull-right-container">
						<i class="fa fa-angle-left pull-right"></i>
					</span>
				</a>
				<ul class="treeview-menu">
					<li><a th:href="@{/apply/elec/one}"><i class="fa fa-circle-o"></i>电子合同申请</a></li>
					<li><a th:href="@{/apply/blank}"><i class="fa fa-circle-o"></i>空白合同申请</a></li>
					<li><a th:href="@{/apply/apply/list}">
						<i class="fa fa-circle-o"></i>
						<span>申请提交</span>
            			<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_apply_count"></span>
						</span>
					</a></li>
					<li><a th:href="@{/apply/modify/list}">
						<i class="fa fa-circle-o"></i>
						<span>合同修改</span>
            			<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_modify_count"></span>
						</span>
					</a></li>
					<li><a th:href="@{/apply/print/list}">
						<i class="fa fa-circle-o"></i>
						<span>合同打印</span>
            			<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_print_count"></span>
						</span>
					</a></li>
					<li><a th:href="@{/apply/put/list}">
						<i class="fa fa-circle-o"></i>
						<span>合同资料上传</span>
            			<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_put_count"></span>
						</span>
					</a></li>
					<li><a th:href="@{/apply/blzl/list}">
						<i class="fa fa-circle-o"></i>
						<span>合同资料补录/作废申请</span>
            			<span class="pull-right-container">
              				<span class="label bg-yellow pull-right"></span>
						</span>
					</a></li>
					<li><a th:href="@{/apply/delete/list}">
						<i class="fa fa-circle-o"></i>
						<span>未盖章合同作废申请</span>
            			<span class="pull-right-container">
              				<span class="label bg-yellow pull-right"></span>
						</span>
					</a></li>
				</ul>
			</li>
			</th:block>
			<th:block th:if="${session.user.right==1 || session.user.right==2 || session.user.right==3 || session.user.right==4}">
			<li class="treeview active">
				<a href="#">
					<i class="fa fa-dashboard"></i>
					<span>审核管理</span>
					<span class="pull-right-container">
						<i class="fa fa-angle-left pull-right"></i>
					</span>
				</a>
				<ul class="treeview-menu">
					<li th:if="${session.user.right==3}"><a th:href="@{/audit/stamp}">
						<i class="fa fa-circle-o"></i>
						<span>合同盖章</span>
						<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_htgz_count"></span>
						</span>
					</a></li>
					<li th:if="${session.user.right==3}"><a th:href="@{/audit/cancel}">
						<i class="fa fa-circle-o"></i>
						<span>合同作废</span>
						<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_htzf_count"></span>
						</span>
					</a></li>
					<li th:if="${session.user.right!=3}"><a th:href="@{/audit/first}">
						<i class="fa fa-circle-o"></i>
						<span>合同初审</span>
						<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_htcs_count"></span>
						</span>
					</a></li>
					<li><a th:href="@{/audit/second}">
						<i class="fa fa-circle-o"></i>
						<span>合同复审</span>
						<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_htfs_count"></span>
						</span>
					</a></li>
					<li><a th:href="@{/audit/ysh}">
						<i class="fa fa-circle-o"></i>
						<span>已审核合同</span>
						<span class="pull-right-container">
              				<span class="label bg-yellow pull-right" id="menu_htfs_count"></span>
						</span>
					</a></li>
					<li th:if="${session.user.right==3}"><a th:href="@{/audit/blzl}">
						<i class="fa fa-circle-o"></i>
						<span>补录资料查看</span>
            			<span class="pull-right-container">
              				<span class="label bg-yellow pull-right"></span>
						</span>
					</a></li>
				</ul>
			</li>
			<li class="treeview active">
				<a href="#">
					<i class="fa fa-dashboard"></i>
					<span>合同统计</span>
					<span class="pull-right-container">
						<i class="fa fa-angle-left pull-right"></i>
					</span>
				</a>
				<ul class="treeview-menu">
					<li><a th:href="@{/statis/flow}"><i class="fa fa-circle-o"></i>流转统计</a></li>
					<li><a th:href="@{/statis/ywlx}"><i class="fa fa-circle-o"></i>业务类型统计</a></li>
				</ul>
			</li>
			</th:block>
			
			<li class="treeview active">
				<a href="#">
					<i class="fa fa-dashboard"></i>
					<span>系统管理</span>
					<span class="pull-right-container">
						<i class="fa fa-angle-left pull-right"></i>
					</span>
				</a>
				<ul class="treeview-menu">
					<th:block th:if="${session.user.right==6 || session.user.username == 'admin'}">
					<li><a th:href="@{/system/config}"><i class="fa fa-circle-o"></i>系统设置</a></li>
					<li><a th:href="@{/system/bjd}"><i class="fa fa-circle-o"></i>报价单设置</a></li>
					<li><a th:href="@{/system/zlqd}"><i class="fa fa-circle-o"></i>资料清单设置</a></li>
					<li><a th:href="@{/system/dept}"><i class="fa fa-circle-o"></i>部门管理</a></li>
					<li><a th:href="@{/system/user}"><i class="fa fa-circle-o"></i>用户管理</a></li>
					</th:block>
					<li><a th:href="@{/user/password}"><i class="fa fa-circle-o"></i>修改密码</a></li>
					<li><a th:href="@{/logout}"><i class="fa fa-circle-o"></i>退出登录</a></li>
				</ul>
			</li>
			
		</ul>
	</section>
</aside>

<div class="content-wrapper">
	<section class="content-header">
		<h1>主标题 <small>副标题</small></h1>
		<ol class="breadcrumb">
			<li><a href="#"><i class="fa fa-dashboard"></i> 链接</a></li>
		</ol>
	</section>
	
	<section class="content">

    </section>
</div>
  
<footer class="main-footer" th:fragment="footer">
	<div class="pull-right hidden-xs">
		<b>Version</b> 1.0.1
	</div>
	<strong>Copyright &copy; 2018 <a href="http://www.hongbung.com/" target="_blank">上海宏邦知识产权代理有限公司</a>.</strong> All rights reserved.
</footer>

<aside class="control-sidebar control-sidebar-light">
    
</aside>

<div class="control-sidebar-bg" ></div>

</div>


</body>
</html>
